IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spPrintQueue_Update')
	BEGIN
		PRINT 'Dropping Procedure spPrintQueue_Update'
		DROP  Procedure  spPrintQueue_Update
	END

GO

PRINT 'Creating Procedure spPrintQueue_Update'
GO
Create Procedure dbo.spPrintQueue_Update
	( 	  
		@PrintQueue_ID int, 
		@FileName varchar(50), 
		@FilePath varchar(50), 
		@UserName varchar(50), 
		@PrinterName varchar(50), 
		@PrinterFileName varchar(50), 
		@PrintCopies int, 
		@Date DateTime, 
		@Printed bit, 
		@PrintedDate DateTime = null
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 10/4/2007    Initial version Updated
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Update the required new record
	UPDATE PrintQueue
	SET
		FileName = @FileName, 
		FilePath = @FilePath, 
		UserName = @UserName, 
		PrinterName = @PrinterName, 
		PrinterFileName = @PrinterFileName, 
		PrintCopies = @PrintCopies, 
		Date = @Date, 
		Printed = @Printed, 
		PrintedDate = @PrintedDate		
	WHERE PrintQueue_ID = @PrintQueue_ID

	-- Return to calling method
	RETURN
	
GO
